package com.sunchangpeng.wechat.mp.menu.bean;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MenuItem {
    //必须
    private MenuType type;
    //必须
    private String name;

    //click等点击类型必须
    private String key;

    //media_id类型和view_limited类型必须
    @JSONField(name = "media_id")
    private String mediaId;

    //view、miniprogram类型必须
    private String url;

    //小程序必须
    @JSONField(name = "appid")
    private String appId;
    @JSONField(name = "pagepath")
    private String pagePath;

    //非必须
    @JSONField(name = "sub_button")
    private List<MenuItem> subItems;
}
